package com.feihong.txgw.model.bean.deliveryAdr;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @name txgw_app
 * @class name：com.feihong.txgw.model
 * @class describe: 收货地址实体类
 * @author wangziheng
 * @time 2017/7/4 16:16
 * @change
 * @chang time
 * @class describe
 */
public class DeliveryAdrEntity implements Parcelable{

    /**
     * 地址id
     */
    private String addr_id;
    /**
     * 收货人姓名
     */
    private String consignee;
    /**
     * 区县级id  (最后一级id)
     */
    private int region_id ;
    /**
     * 详细地址
     */
    private String address;
    /**
     * 手机号
     */
    private String mobile;
    /**
     * 性别
     */
    private String gender;
    /**
     * 是否是默认地址
     */
    private String is_default;
    /**
     * 运费
     */
    private String configure;
    /**
     * 城市id(新增、修改地址用)
     */
    private String citycode;
    /**
     *
     */
    private String house_num;

    private String location_info;
    public DeliveryAdrEntity() {
    }

    public DeliveryAdrEntity(String addr_id, String consignee, int region_id, String address, String mobile, String gender, String is_default, String configure,  String citycode, String house_num, String location_info) {
        this.addr_id = addr_id;
        this.consignee = consignee;
        this.region_id = region_id;
        this.address = address;
        this.mobile = mobile;
        this.gender = gender;
        this.is_default = is_default;
        this.configure = configure;
        this.citycode = citycode;
        this.house_num = house_num;
        this.location_info = location_info;
    }

    protected DeliveryAdrEntity(Parcel in) {
        addr_id = in.readString();
        consignee = in.readString();
        region_id = in.readInt();
        address = in.readString();
        mobile = in.readString();
        gender = in.readString();
        is_default = in.readString();
        configure = in.readString();
        citycode = in.readString();
        house_num = in.readString();
        location_info = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(addr_id);
        dest.writeString(consignee);
        dest.writeInt(region_id);
        dest.writeString(address);
        dest.writeString(mobile);
        dest.writeString(gender);
        dest.writeString(is_default);
        dest.writeString(configure);
        dest.writeString(citycode);
        dest.writeString(house_num);
        dest.writeString(location_info);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DeliveryAdrEntity> CREATOR = new Creator<DeliveryAdrEntity>() {
        @Override
        public DeliveryAdrEntity createFromParcel(Parcel in) {
            return new DeliveryAdrEntity(in);
        }

        @Override
        public DeliveryAdrEntity[] newArray(int size) {
            return new DeliveryAdrEntity[size];
        }
    };

    public String getLocation_info() {
        return location_info;
    }

    public void setLocation_info(String location_info) {
        this.location_info = location_info;
    }

    public String getHouse_num() {
        return house_num;
    }

    public void setHouse_num(String house_num) {
        this.house_num = house_num;
    }

    public String getAddr_id() {
        return addr_id;
    }

    public void setAddr_id(String addr_id) {
        this.addr_id = addr_id;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public int getRegion_id() {
        return region_id;
    }

    public void setRegion_id(int region_id) {
        this.region_id = region_id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getIs_default() {
        return is_default;
    }

    public void setIs_default(String is_default) {
        this.is_default = is_default;
    }

    public String getConfigure() {
        return configure;
    }

    public void setConfigure(String configure) {
        this.configure = configure;
    }


    public String getCitycode() {
        return citycode;
    }

    public void setCitycode(String citycode) {
        this.citycode = citycode;
    }

    @Override
    public String toString() {
        return "DeliveryAdrEntity{" +
                "addr_id='" + addr_id + '\'' +
                ", consignee='" + consignee + '\'' +
                ", region_id=" + region_id +
                ", address='" + address + '\'' +
                ", mobile='" + mobile + '\'' +
                ", gender='" + gender + '\'' +
                ", is_default='" + is_default + '\'' +
                ", configure='" + configure + '\'' +
                ", citycode='" + citycode + '\'' +
                ", house_num='" + house_num + '\'' +
                ", location_info='" + location_info + '\'' +
                '}';
    }
}
